Skip to content

[6.x] Include missing time chars in DateFormat::containsTime - #14555

Merged
jasonvarga merged 1 commit into
6.xfrom
fix-contains-time
Apr 27, 2026
Merged

[6.x] Include missing time chars in DateFormat::containsTime#14555
jasonvarga merged 1 commit into
6.xfrom
fix-contains-time

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

The containsTime helper was missing several PHP date format characters that represent time:

  • a, A — am/pm markers
  • B — Swatch internet time
  • i — minutes
  • s — seconds
  • u — microseconds
  • v — milliseconds

In practice this hasn't been a problem because hours (G/g/H/h) are usually present alongside minutes/seconds, but formats like i:s, g:i a, or just a would have been incorrectly reported as not containing time.

Spotted during review of #14552.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit c891d1a into 6.x Apr 27, 2026
18 checks passed
@jasonvarga
jasonvarga deleted the fix-contains-time branch April 29, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant